import { ReactNode } from 'react';

export type chatMessageType = {
  id: string;
  role: 'USER' | 'BOT';
  content: string;
  chart?: ReactNode;
  data?: ReactNode;
  sql?: string;
};

export type chatContextType = {
  chatid: string;
  title: string;
  context: chatMessageType[];
};

export type ChatHistoryResponse = IChatDialogueMessageSchema[];
export type IChatDialogueMessageSchema = {
  uuid: string;
  role: 'human' | 'view' | 'system' | 'ai';
  context: string;
  order?: number;
  time_stamp?: number | string | null;
  model_name?: string;
  retry?: boolean;
  thinking?: boolean;
  outing?: boolean;
  feedback?: Record<string, any>;
};
